home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / Includes / files / segments.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-30  |  1.7 KB  |  66 lines

  1. #ifndef FILES_SEGMENTS_H
  2. #define FILES_SEGMENTS_H TRUE
  3.  
  4. /*
  5. **   $VER: segments.h V0.9B
  6. **
  7. **   Segment Definitions.
  8. **
  9. **   (C) Copyright 1996-1997 DreamWorld Productions.
  10. **       All Rights Reserved.
  11. */
  12.  
  13. #ifndef DPKERNEL_H
  14. #include <games/dpkernel.h>
  15. #endif
  16.  
  17. /****************************************************************************
  18. ** Segment object.
  19. */
  20.  
  21. #define SEGVERSION   1
  22. #define TAGS_SEGMENT (ID_SPCTAGS<<16)|ID_SEGMENT
  23.  
  24. struct Segment {
  25.   struct Head Head;        /* 00: Standard structure header */
  26.   struct Segment *Prev;    /* 12: Previous segment */
  27.   struct Segment *Next;    /* 16: Next segment */
  28.   LONG   MemType;          /* 20: Memory type (eg MEM_DATA) */
  29.   APTR   Address;          /* 24: Pointer to segment start */
  30.   struct FileName *Source; /* 28: Source of segment */
  31.  
  32.   /* Private fields below */
  33.  
  34.   APTR   prvDOSSeg;
  35. };
  36.  
  37. #define SGA_Prev     (12|TAPTR)
  38. #define SGA_Next     (16|TAPTR)
  39. #define SGA_MemType  (20|TLONG)
  40. #define SGA_Source   (28|TAPTR)
  41.  
  42. /****************************************************************************
  43. ** This structure is identical to the standard segment struct but defines
  44. ** the Address as a function (ANSI-C prevents function<->data type
  45. ** conversion).
  46. */
  47.  
  48. struct CodeSegment {
  49.   struct Head Head;
  50.   struct Segment *Prev;
  51.   struct Segment *Next;
  52.   LONG   MemType;
  53.   __asm void (*Address)(register __d0 LONG ID,
  54.                         register __d1 LONG Version,
  55.                         register __d2 LONG Revision,
  56.                         register __a1 struct DPKBase *,
  57.                         register __a0 BYTE *Arguments);
  58.   struct FileName *Source;
  59.  
  60.   /*** Private fields below ***/
  61.  
  62.   APTR   prvDOSSeg;
  63. };
  64.  
  65. #endif /* FILES_SEGMENTS_H */
  66.